Help Dialog is a freeware program which you can readily modify and adapt to provide your application with an "on-line" help capability. Help Dialog was written in C using Metrowerks CodeWarrior.
 
As you can see, Help Dialog supports the integrated scrolling of styled text and pictures within a modal dialog box. The text is provided by 'TEXT'/'styl' resources and the pictures are provided by 'PICT' resources. The 'TEXT'/'styl' and 'PICT' resources utilized at any one time depends on the help topic chosen in the popup menu above.
Text/Picture Integration - The Non-Breaking Space Character
Text/picture integration is achieved using the same scheme as does SimpleText. In this scheme, a non-breaking space character (ASCII 0xCA) is inserted into the text (by pressing Option- Spacebar) to indicate where the top edge of a picture should go, and several carriage returns are then entered into the text to provide sufficient blank space vertically to accommodate the height of the picture. The pictures are centered laterally in the destination rectangle when drawn.
Separate 'PICT' resources with consecutively numbered IDs must be available for each non-breaking space character in the associated 'TEXT' resource.
Are Pictures Really Necessary?
You do not have to include pictures in a help topic if you do not want to. If the 'TEXT' resource for that particular topic has no non-breaking space characters, Help Dialog will quite happily accommodate that fact.
The Tester Module
The two source files are helptester.c and help.c. Certain lines of code in helptester.c are highlighted with ///////// at the end of each line. These are the lines which must be included in the appropriate areas of your main program for the stuff in help.c to work. Basically, you must:
• Insert your Help menu item into the Help menu.
• Detect mouse-downs in the Help menu.
• Determine if the Help menu item chosen was your Help item
and, if so, call the function doHelp, which is the core function
in help.c.
TextEdit Destination and View Rectangles
The TextEdit destination and view rectangles are established by a User Item in the dialog box (Item 2 in the DITL). Accordingly, if the display is either too small or too large for you, just change the size of the User Item and reposition the scroll bar control accordingly.
Tricks of the Trade
The About Cricket popup menu item in this demo version has been included for two reasons. The first reason is that it shows how you can fake the flowing of text around a picture. The second, and somewhat insubstantial, reason is that the author is a cricket fanatic.
680x0 and PowerPC Ready
You can compile this thing as either 680x0 or PowerPC-native code. (The comment // For PowerPC has been added to the lines in the source code which pertain to the PowerPC.)
Acknowledgements
The text/picture integration methodology, and the function actionProcedure, were adapted from James W. Walker's 1991 freeware program Show_help demo.